home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Amiga Game-Power
/
Amiga Game-Power.iso
/
pd mix ii
/
access
/
hddriver
/
support
/
park.c
< prev
next >
Wrap
C/C++ Source or Header
|
1994-05-20
|
699b
|
37 lines
/* assumes 32 bit ints */
#include "harddisk.h"
extern struct MsgPort *CreatePort();
extern struct IOStdReq *CreateExtIO();
main ()
{
struct IOExtHD *req;
struct MsgPort *port;
int status;
port = CreatePort ( 0 , 0 );
if ( port != NULL ) {
req = (struct IOExtHD *)
CreateExtIO ( port , sizeof ( struct IOExtHD ) );
if ( req != NULL ) {
if ( OpenDevice ( HD_NAME , 0 , req , 0 ) == 0 ) {
req->iohd_TD.iotd_Req.io_Command = HD_PARK;
if ( DoIO ( req ) == 0 ) {
printf ( "Park complete\n" );
}
else {
printf ( "Park failed\n" );
}
CloseDevice ( req );
}
DeleteExtIO ( req , sizeof ( struct IOExtHD ) );
}
DeletePort ( port );
}
}